//==============================================================================
// 21AT-WebGIS平台客户端程序，版权所有，二十一世纪空间技术应用股份有限公司，2000-2009。
// 作者：21AT-WebGIS平台开发组 
// 修改：	 
// 文件名：Overview.js  
// 功能：鹰眼控件
// 最后修改时间：	2009-05-04
//==============================================================================
/**
 * @requires OpenLayers/Control/OverviewMap.js
 */
/**
 * Class: OpenLayers.Control.Overview
 * 
 * 鹰眼控件，显示主地图窗口在全图范围内的相对位置.
 * 
 * 继承自:
 *  - <OpenLayers.Control.OverviewMap>
 */
OpenLayers.Control.Overview = OpenLayers.Class(OpenLayers.Control.OverviewMap, {
	  
    /**
    * APIProperty: minRectSize
    * {Integer} The minimum width or height (in pixels) of the extent
    *     rectangle on the overview map.  When the extent rectangle reaches
    *     this size, it will be replaced depending on the value of the
    *     <minRectDisplayClass> property.  Default is 15 pixels.
    */
   minRectSize: 15,
   
	
	/**
     * APIProperty: fixedScaleView
     * {Float} The ratio of the overview map resolution to the main map
     *     resolution at which to zoom farther in on the overview map.
     */
    fixedScaleView: false,
    /**
     * Method: update
     * Update the overview map after layers move.
     */
    update: function() {
       if(this.ovmap == null) {
           this.createMap();
       }
       
       if(this.autoPan || !this.isSuitableOverview()) {
           if(!this.fixedScaleView){
        	   this.updateOverview();
           }
       }
       
       // update extent rectangle
       this.updateRectToMap();
   },
   
    CLASS_NAME: 'OpenLayers.Control.Overview'
});
